USE [TakeAway]
GO

/****** Object:  Table [dbo].[Pedido]    Script Date: 09/13/2010 02:20:37 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Pedido](
	[Id] [bigint] IDENTITY(1,1) NOT NULL,
	[Numero] [bigint] NOT NULL,
	[Nome] [varchar](50) NOT NULL,
	[Emissao] [datetime] NOT NULL,
	[Estado] [varchar](50) NOT NULL,
	[NomeFuncionario] [varchar](100) NULL,
	[TipoPagamento] [varchar](50) NOT NULL,
	[Valor] [money] NOT NULL,
	[ValorPago] [money] NOT NULL,
	[TipoLocal] [int] NOT NULL,
	[Atribuido] [datetime] NULL,
	[IdExterno] [varchar](25) NULL,
	[NumeroExterno] [numeric](10, 0) NULL,
	[UtilizadorExterno] [nvarchar](30) NULL,
	[NumeroCliente] [numeric](10, 0) NOT NULL,
	[NomeCliente] [varchar](100) NOT NULL,
	[ContribuinteCliente] [varchar](50) NOT NULL,
	[CidadeCliente] [varchar](100) NOT NULL,
	[MoradaCliente] [varchar](255) NOT NULL,
	[CodigoPostalCliente] [varchar](50) NULL,
	[ZonaCliente] [varchar](13) NULL,
	[ObservacoesCliente] [varchar](255) NULL,
	[TelefoneCliente] [varchar](50) NULL,
	[Telemovel1Cliente] [varchar](50) NULL,
	[Telemovel2Cliente] [varchar](50) NULL,
	[Telemovel3Cliente] [varchar](50) NULL,
	[LojaCliente] [varchar](20) NULL,
	[EMail] [nvarchar](45) NULL,
	[Versao] [smallint] NOT NULL,
	[CriadoPor] [nvarchar](150)	NOT NULL,
	[CriadoEm] [datetime] NOT NULL,
	[ActualizadoPor] [nvarchar](150) NOT NULL,
	[ActualizadoEm] [datetime] NOT NULL,
 CONSTRAINT [PK_Pedido] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


